// 类似BattleManager.checkBattleEnd，但仅判断，不处理
BattleManager.isBattleEnd = function() {
    if (this._phase === 'actionList') return false;
    if (this._phase === 'actionTargetList') return false;
    if (this._phase === 'action') return false;
    if (this._phase === 'phaseChange') return false;
    if ($gameTroop.isEventRunning()) return false;
    if (this._phase) {
        if (this.checkAbort()) {
            return true;
        } else if ($gameParty.isAllDead()) {
            return true;
        } else if ($gameTroop.isAllDead()) {
            return true;
        }
    }
    return false;
};


// 加速行动动画(配合configs/params/actor.js中的actorMotionSpeed使用)

BattleManager.actionPerformAction = function() {
    this._logWindow.performAction(this._subject, this._action);
    if (this._subject.isActor() && this._subject.isSpriteVisible) {      // 防御不等待，其它行动等待时间缩短
        if(!this._action.isGuard()){
            this._logWindow._waitCount += 12;
        }
      return false;
    }
    return true;
};



// 战斗开场自动添加祭符图片
let NSWDA_BattleManager_ddBattleStartGlobalStates = BattleManager.addBattleStartGlobalStates
BattleManager.addBattleStartGlobalStates = function(){
    NSWDA_BattleManager_ddBattleStartGlobalStates.call(this);
    for (let i = 0; i < this._globalStates.length; i++) {
        if (this._globalStates[i].id == 3)  $gameScreen.showPicture(1, 'm0', 0, 1020, 64, 100, 100, 255, 0);
        if (this._globalStates[i].id == 4)  $gameScreen.showPicture(2, 'm1', 0, 1068, 64, 100, 100, 255, 0);
        if (this._globalStates[i].id == 5)  $gameScreen.showPicture(3, 'm2', 0, 1116, 64, 100, 100, 255, 0);
    }
  
};
  
// 禁止【中断战斗】播放逃跑音效
BattleManager.checkAbort = function() {
    if ($gameParty.isEmpty() || this.isAborting()) {
        //SoundManager.playEscape();
        this._escaped = true;
        this.processAbort();
    }
    return false;
};